package framework;

/**
 * This is the class that runs the automaton. It combines the user defined
 * automaton plugin and the visualization plugin and runs the automaton once a
 * button is pressed. This class is instantiated in the mainGUI.
 * 
 * @author jtumarki, ntibrewa, shuaihan, wesleyk
 * 
 */
public class AutomatonRunner {
	// user defined automaton
	private AutomatonPlugin automaton;

	// user defined visualization plugin
	private VisualizationPlugin visualization;

	/**
	 * Class constructor: It takes the user defined automaton plugin and
	 * visualization plugin as arguments, and stores them for use later.
	 * 
	 * @param a
	 *            Custom automaton plugin
	 * @param v
	 *            Custom visualization plugin
	 */
	public AutomatonRunner(AutomatonPlugin a, VisualizationPlugin v) {
		automaton = a;
		visualization = v;
	}

	/**
	 * The main method for the project.
	 */
	public void run() {
		MainGUI myGUI = new MainGUI(automaton, visualization);
		myGUI.show(); 
	}
}
